const express = require('express');
const router = express.Router();
const { auth } = require('../middlewares/auth');
const orderController = require('../controllers/order.controller');

// Protected routes
router.post('/create', auth, orderController.createOrder);
router.get('/query', auth, orderController.queryOrder);
router.post('/card/exchange', auth, orderController.exchangeCard);

// Webhook
router.post('/payment/notify', orderController.handlePaymentNotify);

module.exports = router; 